Count Property

Task Parallel System.Threading

Gets the number of elements contained in the ConcurrentBag<(Of <(T>)>).

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Count As Integer
C#
public int Count { get; }

Field Value

The number of elements contained in the ConcurrentBag<(Of <(T>)>).

Implements

ICollection..::.Count

Remarks

The count returned represents a moment-in-time snapshot of the contents of the bag. It does not reflect any updates to the collection after GetEnumerator()()() was called.

See Also